/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package it.kirys.rilego.gui.filtersmanager.setters;

import it.kirys.rilego.engine.processors.imagefilters.SmartSmoothFilter;
import it.kirys.rilego.gui.filtersmanager.nodesmanaging.ComboLeafEditor;
import it.kirys.rilego.gui.filtersmanager.setters.prefs.IFilterPref;
import javax.swing.JComponent;

/**
 *
 * @author kirys
 */
public class SmartSmoothSetter extends AbstractFilterSetter<SmartSmoothFilter>{


	@Override
	public String getLabel() {
		return "Smart Smooth";
	}

	private void initSetters(){
		final SmartSmoothSetter set=  this;
		final SmartSmoothFilter filter = (SmartSmoothFilter)this.getFilter();

	//Brightness setter
		this.add(new IFilterPref<SmartSmoothFilter.SmoothLevel>(){
			ComboLeafEditor levelEditor = new ComboLeafEditor(SmartSmoothFilter.SmoothLevel.values());
			@Override
			public IFilterSetter getSetter() {
				return set;
			}

			@Override
			public SmartSmoothFilter.SmoothLevel getValue() {
				return filter.getLevel();
			}

			@Override
			public void setValue(SmartSmoothFilter.SmoothLevel value) {
				filter.setLevel(value);
			}

			@Override
			public Class<SmartSmoothFilter.SmoothLevel> getPrefType() {
				return SmartSmoothFilter.SmoothLevel.class;
			}

			@Override
			public JComponent getEditor() {
				return levelEditor;
			}

			@Override
			public String getLabel() {
				return "Strength";
			}
		});

	}


	public SmartSmoothSetter(SmartSmoothFilter filter) {
		super(filter);
		initSetters();
	}



}
